package org.jeecg.modules.quartz.job;

import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.business.service.IBusRoomBookingOrdersService;
import org.jeecg.modules.rooms.service.CesRoomsServiceImpl;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import javax.annotation.Resource;
import java.util.Date;

@Slf4j
public class NightAuditJob implements Job {


    private String parameter;

    public void setParameter(String parameter) {
        this.parameter = parameter;
    }
    @Resource
    private IBusRoomBookingOrdersService bookingOrdersService;
    @Resource
    private CesRoomsServiceImpl cesRoomsService;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        log.info("时间{}，酒店id：{}，修改房费",new Date(),parameter);
//        bookingOrdersService.syncDayRoomFee(parameter);
        cesRoomsService.returnReserveRoom();
        cesRoomsService.getReserveRoom();
    }
}
